﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Xc.DataAccess.OneNetCore.Services
{
    public enum Plantform
    {
        电信 = 03 | 05 | 11,
        移动 = 00 | 02 | 04 | 07,
        联通 = 01 | 06 | 09,
        铁通 = 20,
        未知 = 0xFF
    }
    /// <summary>
    /// Nb设备信息
    /// </summary>
    public class NbDeviceInfo:NbDeviceInfoStatus
    {

        /// <summary>
        /// 设备接入协议
        /// </summary>
        [JsonPropertyName("protocol")]
        public string Protocol { get; set; }
        /// <summary>
        /// 设备创建时间，北京时间
        /// </summary>
        [JsonPropertyName("create_time")]
        [JsonConverter(typeof(DateTimeConverter))]
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 认证信息
        /// </summary>
        [JsonPropertyName("auth_info")]
        [JsonConverter(typeof(AuthInfoConverter))]
        public AuthInfo AuthInfo { get; set; }

        /// <summary>
        /// 	设备描述
        /// </summary>
        [JsonPropertyName("desc")]
        public string Description { get; set; }
        /// <summary>
        /// 设备标签
        /// </summary>
        [JsonPropertyName("tags")]
        public string[] Tags { get; set; }
        /// <summary>
        /// 设备位置坐标信息，以经纬度键值对表示:{"lon":xx,"lat":xx}
        /// </summary>
        [JsonPropertyName("location")]
        public Location Location { get; set; }
        /// <summary>
        /// 其他设备自定义信息，以键值对格式表
        /// </summary>
        [JsonPropertyName("other")]
        public Dictionary<string, string> Others { get; set; }
    }
}
